using System;
using Microsoft.SharePoint;

namespace PS.WebParts.Rollup.Core
{
    class WebInfo : IDisposable
    {
        private readonly SPSite site;
        private readonly SPWeb web;

        public WebInfo(SPSite site, SPWeb web)
        {
            this.site = site;
            this.web = web;
        }

        public SPSite Site
        {
            get { return site; }
        }

        public SPWeb Web
        {
            get { return web; }
        }

        #region IDisposable Members

        public void Dispose()
        {
            if (web != null)   
                web.Dispose();
            if (site != null)
                site.Dispose();
        }

        #endregion
    }
}
